package com.yanqu.road.server.cmd.activity.peakseacraft;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.PeakSeacraftProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.peakseacraft.PeakSeacraftMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C_PEAK_SEACRAFT_GET_USER_DATA, desc = "海上争霸 南海丝路 玩家信息")
public class CrossPeakSeacraftGetUserDataCmd extends CrossUnionCommand {
    PeakSeacraftProto.PeakSeacraftGetUserDataGameToCrossMsg msg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        msg = PeakSeacraftProto.PeakSeacraftGetUserDataGameToCrossMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        PeakSeacraftMgr.getUserData(msg.getActivityId(), packet.getPlayerId(), serverId, msg);
    }

    @Override
    public void sendData() {

    }
}
